package com.example.huainanlive.adapter

import android.graphics.Color
import android.widget.ImageView
import android.widget.TextView
import coil.load
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.huainanlive.R
import com.example.huainanlive.bean.GetLiveHousePreviewBeanItem
import com.example.huainanlive.bean.GetLiveHouseRecordBeanItem

class LiveHouseRecordAdapter: BaseQuickAdapter<GetLiveHouseRecordBeanItem, BaseViewHolder>(R.layout.item_live_house_preview) {
    override fun convert(holder: BaseViewHolder, item: GetLiveHouseRecordBeanItem) {

        holder.getViewOrNull<TextView>(R.id.liveTitle)?.text = item.liveTitle
        holder.getViewOrNull<TextView>(R.id.liveStartTime)?.text = item.liveStartTime
        holder.getViewOrNull<ImageView>(R.id.livePreview)?.load(item.liveCoverImg)

    }
}